<?php
/**
 * This file defines the {@see \BF\Config\IWriter} interface.
 *
 * @author     Kado <ulfikado@gmail.com>
 * @category   Beluga PHP5.3+ Framework
 * @package    BF\Core
 * @since      2015-01-28 14:29
 * @subpackage Config
 * @version    0.1
 */

namespace BF\Config
{

   /**
    * If you want implement youre own configuration writer, you have to implement this interface.
    *
    * The writer must do write the config data to defined source. (e.g. files or databases)
    *
    * @since v0.1
    */
   interface IWriter
   {

      /**
       * Writes all defined config values to based source.
       *
       * @param  \BF\Config\ValueCollection $configValues All config values to write.
       * @return boolean TRUE on success, FALSE otherwise.
       */
      function write( \BF\Config\ValueCollection $configValues );

      /**
       * Returns a config data reader of current source.
       *
       * @return \BF\Config\IReader
       */
      function getReader();

      /**
       * Returns all current defined writer options as a associative array. The used options are depending to the
       * writer implementation.
       *
       * @return array
       */
      function getOptions();

      /**
       * Returns if writing to current source can be used.
       *
       * @return boolean
       */
      function canWrite();

   }

}

